import request from "@/utils/request";
//获取分类列表
export const getCategoryList = props => {
  return request({
    url: "/mall/selectProduct/categoryList",
    method: "post",
    data: props
  });
};
//分页商品查询
export const getSelectPage = props => {
  return request({
    url: "/mall/selectProduct/page",
    method: "post",
    data: props
  });
};
//获取商品数量
export const getProductNum = props => {
  return request({
    url: "/mall/selectProduct/productNum",
    method: "post",
    data: props
  });
};

//根据id获取区域
export const getOperateAreaList = props => {
  return request({
    url: "/mall/admin/product/getOperateAreaList",
    method: "post",
    data: props
  });
};

/**
 * 可选商品-查询属性列表
 */
export const queryStastsList = props => {
  return request({
    url: "/mall/selectProduct/queryStastsList",
    method: "post",
    data: props
  });
};

// ========================================预警商品============================================================
//分页获取预警商品list
export const getWarnList = props => {
  return request({
    url: "/mall/selectProduct/getWarnList",
    method: "post",
    data: props
  });
};
//获取预警商品-分类list
export const getWarnCategoryList = props => {
  return request({
    url: "/mall/selectProduct/getWarnCategoryList",
    method: "post",
    data: props
  });
};
//获取预警商品-属性list
export const getWarnStatsList = props => {
  return request({
    url: "/mall/selectProduct/getWarnStatsList",
    method: "post",
    data: props
  });
};
//获取预警商品-地区列表
export const getWarnAreaList = props => {
  return request({
    url: "/mall/selectProduct/get-warn-area-list",
    method: "post",
    data: props
  });
};
//已完成相似商品补充
export const finishSupply = props => {
  return request({
    url: "/mall/selectProduct/finish-supply",
    method: "post",
    data: props
  });
};
//图片打标-传入图片可访问的地址，返回解析出来的关键词，后续可使用该关键词进行商品查询
export const imgMarking = props => {
  return request({
    url: "/mall/admin/image/marking",
    method: "post",
    data: props
  });
};
